<%@ page language="java" import="java.util.*" pageEncoding="utf-8"  isELIgnored="false"%>
<%@ include file="../tag.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>热门标签</title>
<meta name="Keywords"
	content="软件开发、编程、程序员、码伦">
<meta name="description" content="Java、C、C++、软件开发、编程、程序员、.NET">
<%@ include file="../base.jsp"%>
<%@ include file="../alert-common.jsp"%>
<%@ include file="../window-common.jsp"%>
<style type="text/css">
	.bq ul{
		float: left;
		margin-top: 8px;
	}
	.bq ul li{
		float: left;
		line-height: 30px;
		width:80px;
		padding-left: 30px;
		font-size: 16px;
	}
</style>
<script type="text/javascript">
		$(function(){
				$.post('expose/article/articleTypeList',
					function(data,status){
					$('.hot-bq ul').empty();
						var cLi = "";
						var cID = ${articleTypeId};
						for(var i=0;i<data.length;i++){
						var cLi1 = "";
							if(cID == data[i].id){
								cLi1 ="<li class=\"hot-bq-current\"><a href=\"expose/article/byArticleTypeList/"+data[i].id+"\" title=\""+data[i].articleTypeName+"\">"+data[i].articleTypeName+"</a></li>";
							}else{
								cLi1 ="<li><a href=\"expose/article/byArticleTypeList/"+data[i].id+"\" title=\""+data[i].articleTypeName+"\">"+data[i].articleTypeName+"</a></li>";
							}
							 cLi += cLi1;
						}
						$('.hot-bq ul').append(cLi)
					}
				);
 		});
</script>
</head>
<body>
	<jsp:include page="/expose/top.jsp"></jsp:include>
	<div class="yc_container">
			<div class="hot-bq">
				<ul></ul>
			</div>
			<div class="hot-center">
				<span style="float: left;margin: 6px 0 6px 5px;">内容列表</span>
			</div>
			<div  style="height: 850px;width: 710px;">
					<ul style="float: left;margin-top: 3px;">
							<c:forEach items="${articles}" var="article">
									<li style="height: 80px;float: left;width: 710px;">
											<div style="width: 80px;float: left;">
												<img alt="${article.user.chName }" title="${article.user.chName }" src="expose/article/showPicture/${article.userId}" style="border-radius:4px;width: 50px;height: 50px; " >
											</div>
											<div style="float: left;width: 620px;height: 80px;">
													<div style="font-weight: bold;font-size: 14px;height: 25px;">
															<a href="expose/article/detail/${article.id }" title="${article.articleTitle }">${article.articleTitle }</a>
													</div>
													<div>
															<span style="font-size: 12px;">发表时间:<fmt:formatDate value="${article.createDate }" type="both" pattern="yyyy-MM-dd HH:mm:ss" /></span>
								                			<span>评分:5</span>
								                			<div style="width: 620px;font-size: 13px;height: 30px;margin-top: 5px;">
							                					${fn:substring(article.articleBriefIntroduction, 0, 100)} 
								                			</div>
													</div>
											</div>
									</li>
							</c:forEach>
					</ul>
			</div>
			<div class="page" style="margin-left: 0;width: 710px;">
						 <span><a href="communityAnswer?pageNow=1">首页</a></span>
						         <c:choose>
						                 <c:when test="${page.pageNow -1 >0}">
						                   			<span><a href="communityAnswer?pageNow=${page.pageNow-1}">上一页</a></span>
						                   	</c:when>
						          </c:choose>
						            <c:forEach begin="1" end="${page.totalPageCount}" var="pageIndex">
						                   	 <c:choose>
						                   			<c:when test="${page.pageNow==pageIndex}">
						                   					<span><a href="javascript:void(0);" style="float: left;background:#EAEAEA; ">${pageIndex }</a></span>
						                   			</c:when>
							                   	  <c:otherwise>
							                   				<span><a href="communityAnswer?pageNow=${pageIndex}" target="_self">${pageIndex }</a></span>
							                   	</c:otherwise>
						                   </c:choose>
						                   </c:forEach>
						                     <c:choose>
						                   			<c:when test="${page.pageNow <page.totalPageCount}">
						                  				<span><a href="communityAnswer?pageNow=${page.pageNow+1 }" target="_self">下一页</a></span>
						                   			</c:when>
						                   </c:choose>
						                  <span><a href="communityAnswer?pageNow=${page.totalPageCount}">末页</a></span>
					</div>
        </div>
	<jsp:include page="/expose/bottom.jsp"></jsp:include>
</body>
</html>
